package com.example.samples;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import com.example.R;

/**
 * Created with IntelliJ IDEA.
 * User: Andrei
 * Date: 8/7/12
 * Time: 10:58 PM
 * To change this template use File | Settings | File Templates.
 */
public class ExampleRotateAndScale extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.example_rotate_and_scale);
        final Animation animation = AnimationUtils.loadAnimation(this, R.anim.rotate);
        animation.setFillAfter(true);
        animation.setFillEnabled(true);
        findViewById(R.id.tv).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                findViewById(R.id.tv).startAnimation(animation);
            }
        });
    }
}